﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InitSystem : Singleton<InitSystem>
{
    public Hero hero;

    // private void Start()
    // {
    //     // Setup();
    // }

    // public void Setup()
    // {
    //     InfoSystem.Instance.LoadGame();
    //     hero = InfoSystem.Instance.hero;
    //     HeroSystem.Instance.Setup(hero);
    //     CardSystem.Instance.Setup(hero.Cards);
    //     RelicSystem.Instance.Setup(hero.Relics);
    //     // EnemySystem.Instance.Setup(MapSystem.Instance.enemyList);
    //     ActionSystem.Instance.Perform(new DrawCardsGA(5));
    // }
    public void SetupById(int id)
    {
        InfoSystem.Instance.LoadGame();
        hero = InfoSystem.Instance.hero;
        HeroSystem.Instance.Setup(hero);
        CardSystem.Instance.Setup(hero.Cards);
        RelicSystem.Instance.Setup(hero.Relics);
        // EnemySystem.Instance.Setup(MapSystem.Instance.enemyList);
        EnemySystem.Instance.SetupById(id);
        ActionSystem.Instance.Perform(new DrawCardsGA(5));
    }

    public void FightSceneSaveGame()
    {
        // InfoSystem.Instance.hero.cards = CardSystem.Instance.Cards();
        InfoSystem.Instance.hero = hero;
        InfoSystem.Instance.SaveGame();
    }
}
